package cn.mn.ac.demo.comsumer;

import io.gitee.hfl.rocketmq.annotation.RocketConsumer;
import io.gitee.hfl.rocketmq.annotation.SubscriptionExpression;
import io.gitee.hfl.rocketmq.consumer.RocketListener;
import io.gitee.hfl.rocketmq.msg.RocketMessage;
import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.client.apis.consumer.ConsumeResult;
import org.apache.rocketmq.client.apis.message.MessageView;

/**
 * @author hefulin
 * @date 2022/8/30 14:44
 */
@Slf4j
//@RocketConsumer(group = "${delay.group}", subscriptionExpressions = {
//        @SubscriptionExpression(topic = "${delay.topic}", expression = "${delay.expression}")
//})
public class ExampleDelayConsumerListener implements RocketListener<RocketMessage<String>> {

    @Override
    public ConsumeResult consume(MessageView message, RocketMessage<String> messageBody) {
        log.info("Message:{}", message);
        return ConsumeResult.SUCCESS;
    }
}